package com.workcell.workdata.xthings.kafka.content;

import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * @Author 廖博文
 * @Date 2023/5/25 12:03
 * @Description 策略模式
 */
@Service
public class MqContext {

	private final Map<String, MqService> mqServiceMap;

	public MqContext(Map<String, MqService> mqServiceMap){
		this.mqServiceMap = mqServiceMap;
	}

	public MqService getMqService(String topic){
		return mqServiceMap.get(topic);
	}

}
